Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technical/Fix documentation formatters usage example #1096

Merged
merged 1 commit into from
Jun 22, 2024
Merged

Technical/Fix documentation formatters usage example #1096

merged 1 commit into from
Jun 22, 2024

Conversation

bestwebua
Copy link
Contributor

This PR is created in order to have up to dated documentation. Following to the code under the hood:

def formatters=(formatters)
@formatter = SimpleCov::Formatter::MultiFormatter.new(formatters)
end

For SimpleCov.formatters call examples in the current documentation we need to use array of formatters:

SimpleCov.formatters = [
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::CSVFormatter,
]

instead of instance of SimpleCov::Formatter::MultiFormatter:

SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::CSVFormatter,
])

@PragTob
Copy link
Collaborator

PragTob commented Jun 22, 2024

Heyo, thanks for the fix!

@PragTob PragTob merged commit 5de91ff into simplecov-ruby:main Jun 22, 2024
7 checks passed
@bestwebua bestwebua deleted the technical/fix-documentation-formatters-usage-example branch June 22, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants